﻿using System;
using System.Runtime.Serialization;

namespace EvidenceManagement.Model
{
    /// <summary>
    /// Specifies data source interaction attributes for a data object class.
    /// </summary>
    [global::System.AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
    [DataContract]
    public sealed class DbObject : System.Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DbObject"/> class.
        /// </summary>
        public DbObject()
        {
        }

        /// <summary>
        /// Gets or sets the Insert DbCommand text.
        /// </summary>
        /// <value>The insert command text.</value>
        [DataMember]
        public string InsertCommandText
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the Select DbCommand text.
        /// </summary>
        /// <value>The select command text.</value>
        [DataMember]
        public string SelectCommandText
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the Update DbCommand text.
        /// </summary>
        /// <value>The update command text.</value>
        [DataMember]
        public string UpdateCommandText
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the Delete DbCommand text.
        /// </summary>
        /// <value>The delete command text.</value>
        [DataMember]
        public string DeleteCommandText
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the List DbCommand text.
        /// </summary>
        /// <value>The list command text.</value>
        [DataMember]
        public string ListCommandText
        {
            get;
            set;
        }
    }
}
